Currently, image pickup devices such as digital cameras and camera phones are widely used to take photographs. As known, the definition of the object taken by the image pickup device is largely effected by the focusing operation of the image pickup device. In order to achieve high image quality of the object, the focal length should be properly adjusted to focus on the object. In other words, the quality of the digital camera or the camera phone is highly dependent on the auto focus method applied to the digital camera.
Generally, the auto focus methods are classified into two types, i.e. an active auto focus method and a passive auto focus method. Since the active auto focus method needs extra detector and beam projector, the cost of the digital camera is increased and thus the passive auto focus method is more popular.
The steps for implementing the passive auto focus method are illustrated with reference of the flowchart of FIG. 1. In accordance with the passive auto focus method, the lens of the camera is moved to different focusing positions in different lens positions or steps (i.e. sampling steps), and the focus values at different positions are analyzed in order to discriminate whether the image is sharp or not. The lens position's sharpness value is also called the focus value. First of all, the lens of the digital camera is firstly moved to a first position and the image data at this position is captured (Step 101). Then, the focus value of the image is calculated (Step 102). If this focus value is the maximum focus value (Step 103), the auto focus (AF) process is finished. Otherwise, the lens is moved to the next position (Step 104), and the steps 101, 102 and 103 are repeated until the maximum focus value is searched.
From the flowchart of FIG. 1, the passive auto focus method includes two parts, i.e. the focus value measurement and the lens position search algorithm.
Conventionally, there are several means for implementing focus value measurements such as global search algorithm, hill-climbing search algorithm, binary search algorithm and ruled-based search algorithm. These focus value measurements are well known to those skilled in the art, and are not intended to describe redundantly herein. Typically, search time, number of the lens movement steps and search accuracy are all very important for the lens position search algorithm. Generally, longer search time means lower auto focus efficiency, and more lens movement steps consume more power of the camera because each movement step needs power. Whereas, too short search time or insufficient movement steps are detrimental to the searching accuracy.
For example, since the global search algorithm captures image in every lens movement step (or unit sampling step) and determines the position with the maximum focus value, the search result of the global search algorithm is the most correct among these lens position search algorithms. However, the global search algorithm needs too long search time and too many lens movement steps. In addition, the binary search algorithm is faster than the global search algorithm, but the generated image noise is detrimental to determination of the maximum focus value. Moreover, the lens needs to move back and forth to obtain the peak position, which might suffer from mechanical backlash problem and shorten the lifetime of the digital camera. As previously described, these algorithms for implementing focus value measurements have respective advantages and limitations, the selection of the desired algorithm is determined according to the user's requirement.
Moreover, the conventional algorithm for implementing focus value measurements further comprises a fixed focusing position search algorithm. The focus values detected at some fixing focusing positions such as 30 cm, 50 cm, 1 m, 2 m or 3 m are analyzed in order to discriminate whether the image is sharp or not. In such algorithm, the search time is reduced and the power consumption of the digital camera is saved. However, since every lens has respective attributes, the focus values detected at the fixing focusing positions sometimes fail to obtain searching accuracy.
In views of the above-described disadvantages of the prior art, the applicant keeps on carving unflaggingly to develop a method for evaluating effective sampling steps of auto focus according to the present invention through wholehearted experience and research.